package com.freesky.common.enums;

/**
 * @author: 陈玉林
 * @modifiedBy:
 * @date: Create In 15:50 2018/12/6
 * @description:
 */
public enum ResponseEnum {
    LOGIN_SUCCESS(200, "登录成功<br /><br />欢迎回来"),
    ROLE_IN_USE(-1, "该角色正在使用中"),
    PERM_IN_USE(-1, "该权限正在使用中"),
    UPDATE_SOLR_INDEX_FAIL(-1, "更新SOLR索引失败"),
    ADD_EXPAND_LEXICON_SUCCESS(200, "添加拓展词库成功，请尽快联系运维重启Solr服务器"),
    ADD_EXPAND_LEXICON_FAIL(-1, "添加拓展词库失败"),
    DELETE_EXPAND_LEXICON_SUCCESS(200, "删除拓展词库成功，请尽快联系运维重启Solr服务器"),
    DELETE_EXPAND_LEXICON_FAIL(-1, "删除拓展词库失败"),
    LOGIN_ERROR_VERIFY_CODE(-1, "验证码输入有误"),
    SHIRO_UNKNOW_ACCOUNT(-1, "用户名输入有误"),
    SHIRO_ERROR_PASSWORD(-1, "密码输入有误"),
    SHIRO_ERROR_GET_USER(-1, "获取当前用户失败"),
    UPDATE_SYSTEM_INFO_ERROR(-1, "更新系统信息失败"),
    DELETE_SYSTEM_LOG_ERROR(-1, "删除系统日志失败"),
    DELETE_HOME_NAV_ERROR(-1, "删除首页导航失败"),
    ADD_HOME_NAV_ERROR(-1, "添加首页导航失败"),
    UPDATE_HOME_NAV_ERROR(-1, "更新首页导航失败"),
    ADD_PANEL_ERROR(-1, "添加版块失败"),
    PANEL_EXIST_ERROR(-1, "该版块已存在"),
    UPDATE_PANEL_ERROR(-1, "编辑版块失败"),
    DELETE_PANEL_ERROR(-1, "删除版块失败"),
    ADD_HOME_ROTATION_CHART_ERROR(-1, "添加首页轮播图失败"),
    UPDATE_HOME_ROTATION_CHART_ERROR(-1, "更新首页轮播图失败"),
    DELETE_HOME_ROTATION_CHART_ERROR(-1, "删除首页轮播图失败"),
    ITEM_ADD_ERROR(-1, "添加商品失败"),
    ITEM_UPDATE_ERROR(-1, "更新商品失败"),
    ITEM_DESC_ADD_ERROR(-1, "添加商品描述失败"),
    ITEM_DESC_UPDATE_ERROR(-1, "更新商品描述失败"),

    LACK_PERM(403, "权限不足"),;

    private int code;
    private String msg;

    ResponseEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
